-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: normalize path separator for rootDir replacement #7814
Conversation
@@ -1375,40 +1410,36 @@ describe('testPathPattern', () => { | |||
|
|||
describe('win32', () => { | |||
beforeEach(() => { | |||
jest.resetModules(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to fight the mocking a bit to properly reset it.
Broke tests for directories with parens... https://github.com/facebook/jest/blob/bc0f21d8145564364db5c12699224eb5c25c365e/packages/jest-cli/src/__tests__/SearchSource.test.js#L238-L256 |
return path.resolve( | ||
rootDir, | ||
path.normalize('./' + filePath.substr('<rootDir>'.length)), | ||
return slash( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this could break glob patterns with escape sequences.
Like <rootDir>/test \(in brakets\)/*.js
Maybe add a test case for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun!
What's the status of this PR? |
Need to get back to it, but I haven't got access to a windows computer ATM, so I won't be able to any time soon |
Ideally |
This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Ref webpack/webpack#8740.
/cc @sokra
Test plan
Unit test added